package myclassloader;

/**
 * 测试MyClassLoader
 * Wali类如下
 * public class Wali{
 *     static{
 *         System.out.println("Hello Wali!");
 *     }
 * }
 * @Author: cctv
 * @Date: 2019/5/14 14:41
 */
public class ClassLoaderTest {
    public static void main(String[] args) throws ClassNotFoundException, IllegalAccessException, InstantiationException {
        MyClassLoader m = new MyClassLoader("D:\\test\\", "Wali");
        Class c = m.loadClass("Wali");
        System.out.println(c.getClassLoader());
        c.newInstance();
    }
}
